package lex.mxbeans.ui;

import javax.swing.JInternalFrame;

import lex.mxbeans.utils.MXBeanInfo;

public class MXBeanViewer extends JInternalFrame {
	private MXBeanViewPane view = null;

	public MXBeanViewer() {
		view = new MXBeanViewPane();
		this.setContentPane(view);
		// --------------------------
		this.setClosable(true);
		this.setResizable(true);
		this.setMaximizable(true);
		this.setIconifiable(true);
	}

	public void setMXBean(MXBeanInfo bean) {
		this.setTitle(bean.getName());
		this.view.setMXBeans(bean.getBeans());
	}
}
